package com.xmall.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xmall.product.define.dto.saleAttr.SaleAttrDo;
import com.xmall.product.define.request.attr.SaleAttrQueryParams;
import com.xmall.product.entity.SaleAttr;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 属性 Mapper 接口
 * </p>
 *
 * @author xmall
 * @since 2023-11-02
 */
@Mapper
public interface SaleAttrMapper extends BaseMapper<SaleAttr> {

    /**
     * 属性列表
     */
    List<SaleAttrDo> listWithCascade(@Param("params") SaleAttrQueryParams params);

    /**
     * 获取属性
     */
    SaleAttrDo infoWithCascade(@Param("id") Long id);

    /**
     * 获取排序值
     */
    Integer getMaxSort(@Param("categoryId") Long categoryId);
}
